package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.wx.region.vo.RegionVo;
import com.cskaoyan.service.wx.WxRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Name : WxRegionController.java
 * @Time : 2021/8/14 22:36
 * @Author : creamycandy
 * @Software : IntelliJ IDEA
 */
@RestController
@RequestMapping("wx/region")
public class WxRegionController {

    @Autowired
    WxRegionService wxRegionService;

    @RequestMapping("list")
    public BaseRespVo getRegionList(Integer pid){
        List<RegionVo> regionVos = wxRegionService.getRegionVo(pid);
        return BaseRespVo.ok(regionVos);
    }
}
